package com.gem.studentquery;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;

public class StudentService extends Service {
	private String[] names = { "德华", "志玲", "杨幂", "赵薇" };
	 private IBinder binder=new StudentBinder();
	 
	 public String query(int no){
		 if(no>0 && no<5){
			return names[no-1];
		 }
		 return null;
	  }

	@Override
	public IBinder onBind(Intent intent) {
		return binder;
	}
	
	private class  StudentBinder extends Binder implements IStudnet{

		@Override
		public String queryStudent(int no) {
			return query(no);
		}
		
	}
	

}
